package com.iam.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iam.core.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author camel
 * @since 2022-11-09
 */
@Mapper
@Repository
public interface AuthSysUserMapper extends BaseMapper<SysUser> {
    /**
     * 查询用户关联的菜单信息
     *
     * @param uid
     * @return
     */
    List<String> selectUserMenu(Integer uid);

    /**
     * 查询指定用户ID的角色名称
     *
     * @param uid
     * @return
     */
    List<String> selectUserRole(Integer uid);

    /**
     * 查询ROOT的菜单信息（所有）
     *
     * @return
     */
    List<String> selectRootMenu();
}
